all: idgen.so

idgen.so: LIdGen.c IdGenerator.c IdGenOptions.c SnowWorkerM1.c SnowWorkerM2.c YitIdHelper.c
	gcc -fPIC --shared -g -O0 -Wall -I/usr/local/include -o $@ $^ -L/usr/local/lib

test: all
	lua test.lua

clean:
	rm -f idgen.so
